<?php

class Zend_View_Helper_ProductFeatures extends Zend_View_Helper_Abstract
{

	/**
	 * @param string $features
	 * @return string
	 */
	public function productFeatures($features)
	{
		$features = trim($features);
		if(!empty($features)) {
			$lines = preg_split('#(\r\n?|\n)#', $features);
			if(count($lines) > 0) {
				return sprintf('<ul><li>%s</li></ul>', implode('</li><li>', $lines));
			}
		}
		return '';
	}

}